<template>
	<view class="autonomous" :style="{ paddingTop: safeAreaTop + 'px' }">
		<up-navbar :title="pageTitle" bgColor="#FFF1E3" :autoBack="true" />
		<view class="mt-1">
			<human-map />
		</view>
		<view class="content">
			<view class="menu-btn flex-r s-b">
				<button :class="{'button-normal':true,'button-active':menuIndex==0}" @click="menuIndex=0">基础解读</button>
				<button :class="{'button-normal':true,'button-active':menuIndex==1}" @click="menuIndex=1">能量中心</button>
				<button :class="{'button-normal':true,'button-active':menuIndex==2}" @click="menuIndex=2">闸门&通道</button>
				<button :class="{'button-normal':true,'button-active':menuIndex==3}" @click="menuIndex=3">行星统计</button>
			</view>
			<view class="menu-list">
				<!-- 基础解读 -->
				<view class="" v-if="menuIndex==0">
					<view class="mt-1">
						<view class="menu-item flex-r s-b a-c">
							<text class="font-bold">合图配置：（5 - 4）不再是一段感情了</text>
							<text class="iconfont icon-zuozuo" />
						</view>
						<view class="mt-1">
							<view class="group mb-1">友谊通道</view>
							<view class="menu-item flex-r s-b a-c mb-1">
								<view class="flex-c">
									<text class="title">10-57 完美形式的通道</text>
									<text class="person-left">晓明-闸门 10自我主题</text>
									<text class="person-right">刘明涛-闸门 57-力量</text>
								</view>
								<text class="iconfont icon-zuozuo" />
							</view>
						</view>
						<view class="mt-1">
							<view class="group mb-1">相伴通道</view>
							<view class="menu-item flex-r s-b a-c mb-1">
								<view class="flex-c">
									<text class="title">10-57 完美形式的通道</text>
									<text class="person-left">晓明-闸门 10自我主题</text>
									<text class="person-right">刘明涛-闸门 57-力量</text>
								</view>
								<text class="iconfont icon-zuozuo" />
							</view>
						</view>
					</view>
				</view>
				<!-- 能量中心 -->
				<view class="" v-else-if="menuIndex==1">

				</view>
				<!-- 闸门&通道 -->
				<view class="" v-else-if="menuIndex==2">

				</view>
				<!-- 行星统计 -->
				<view class="" v-else-if="menuIndex==3">

				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	import HumanMap from './components/duoMap.vue'
	const props = defineProps({
		pageTitle: {
			type: String,
			default: ''
		}
	})
	const safeAreaTop = uni.$safeArea?.safeAreaTop || 44;
	const menuIndex = ref(0)
</script>

<style lang="scss" scoped>
	page {
		background: linear-gradient(180deg, #FFF1E3 0%, #FFF9EC 100%);
	}

	.autonomous {
		background: linear-gradient(180deg, #FFF1E3 0%, #FFF9EC 100%);
	}

	.content {
		background: #fff;

		.menu-btn {
			padding: 20rpx;

			.button-active {
				font-size: 28rpx;
				color: #000000;
				background: #FED523;
			}
		}

		.menu-list {
			padding: 0 20rpx 20rpx;

			.tag {
				view {
					width: 12rpx;
					height: 12rpx;
					background: #FED523;
					border-radius: 50%;
					margin-left: 10rpx;
				}

				text {
					font-weight: 500;
					font-size: 28rpx;
					color: #A6A6A6;
				}
			}

			.group {
				font-weight: 500;
				font-size: 26rpx;
				color: #A6A6A6;
				text-align: center;
			}

			.menu-item {
				background: #F9F9F9;
				border-radius: 20rpx;
				padding: 30rpx;

				.font-bold {
					font-weight: 600;
				}

				.title {
					font-weight: 500;
					font-size: 30rpx;
					color: #393939;
					margin-bottom: 10rpx;
				}

				.person-left {
					font-size: 20rpx;
					color: #0B789A;
					line-height: 28rpx;
				}

				.person-right {
					font-size: 20rpx;
					color: #D99C08;
					line-height: 28rpx;
				}
			}
		}
	}
</style>